home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / database / wevnt209.zip / STARTWIN.BAT < prev    next >
DOS Batch File  |  1996-05-14  |  1KB  |  31 lines

  1. @echo off
  2. :StartWin
  3.  
  4. win                             REM when testing, rem this line
  5.  
  6. rem erlevel %1                  REM when testing, un rem this line
  7.  
  8. if errorlevel 8 if not errorlevel 9 goto Test1
  9. if errorlevel 7 if not errorlevel 8 goto Test2
  10. Echo: No errorlevel was processed - Exiting to DOS -
  11. if errorlevel 0 if not errorlevel 1 goto end        REM If you didn't get an errorlevel.
  12. goto quit                       REM If the errorlevel is greater that zero.
  13.  
  14. :test1
  15. set %1=errorlevel               REM Set a variable so we can display the value
  16. Echo Errorlevel is ' %1 ', Running 'Your Program test1' and then Restarting Windows.
  17. pause Put your the program you want to start here. Press Ctrl+C to exit to DOS.
  18. goto StartWin                   REM Restart Windows
  19.  
  20. :test2
  21. set %1=errorlevel               REM Set a variable so we can display the value
  22. Echo Errorlevel is ' %1 ', Running 'Your Program test2' and then Restarting Windows.
  23. pause Put your the program you want to start here. press Ctrl+C to exit to DOS.
  24. goto StartWin                   REM Restart Windows
  25.  
  26. :quit                           REM Display the errorlevel
  27. set %1=errorlevel               REM Set a variable so we can display the value
  28. Echo Errorlevel is ' %1 '
  29. :end                            REM End of batch file
  30. set 1=                          REM Clear the memory for the variable
  31.